package com.originskyseed.platform.cms.service;

import java.util.List;
import java.util.Map;

import com.originskyseed.platform.cms.model.ProductInfoTemplate;
import com.originskyseed.platform.core.base.BasePage;

/**
 * 产品模板信息表Service接口类（OSI_PRODUCT_INFO_TEMPLATE）
 * 
 * @author Tangwanghui
 */
public interface IProductInfoTemplateService {

	/**
	 * 删除记录
	 *
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public int deleteByPrimaryKey(String id) throws Exception;

	/**
	 * 批量删除记录
	 *
	 * @param ids
	 * @return
	 * @throws Exception
	 */
	public int deleteByPrimaryKeys(List<String> ids) throws Exception;

	/**
	 * 插入记录
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int insert(ProductInfoTemplate record) throws Exception;

	/**
	 * 插入记录（仅非空值字段）
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int insertSelective(ProductInfoTemplate record) throws Exception;

	/**
	 * 更新记录
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int updateByPrimaryKey(ProductInfoTemplate record) throws Exception;

	/**
	 * 更新记录（仅非空值字段）
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int updateByPrimaryKeySelective(ProductInfoTemplate record) throws Exception;

	/**
	 * 查询记录
	 *
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public ProductInfoTemplate selectByPrimaryKey(String id) throws Exception;

	/**
	 * 查询列表
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public List<ProductInfoTemplate> selectList(ProductInfoTemplate record) throws Exception;

	/**
	 * 分页查询列表
	 *
	 * @param params
	 * @param page
	 * @return
	 * @throws Exception
	 */
	public BasePage<ProductInfoTemplate> selectListByPage(Map<String, Object> params, BasePage<ProductInfoTemplate> page) throws Exception;

	/**
	 * 根据
	 *
	 * @param userId
	 * @return
	 * @throws Exception
	 */
	public ProductInfoTemplate selectProductInfoTemplateByUserId(String userId) throws Exception;

	/**
	 * 修改默认模板
	 *
	 * @param id
	 * @param userId
	 * @param isDefault
	 * @return
	 * @throws Exception
	 */
	public int updateIsDefault(String id,String userId,Integer isDefault) throws Exception;

}